package cn.com.sueframe.action;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.List;
import java.util.Map;

import cn.com.sueframe.common.IDGenerator;
import cn.com.sueframe.exception.ApplicationException;
import cn.com.sueframe.service.CompanyInfoService;
import cn.com.sueframe.vo.CertificationVO;
import cn.com.sueframe.vo.CompanyVO;
import cn.com.sueframe.vo.GoodsVO;
import cn.com.sueframe.vo.OrderMenuVO;
import cn.com.sueframe.vo.PageVO;
import cn.com.sueframe.vo.PicVO;
import cn.com.sueframe.vo.TopPicVO;

public class CompanyInfoAction extends BaseAction{

	/**
	 * 
	 */
	private static final long serialVersionUID = 315935098587843033L;

	/**
	 * 公司信息服务层
	 */
	private CompanyInfoService companyInfoService;
	/**
	 * 用来存储是否根据商品类型进行查询的标志，0表示否,非0表示是
	 */
	private static Hashtable<String,String> findByGoodsTypeTable = new Hashtable<String,String>();

	public String findCompanyInfo() {
		init();
		CompanyVO companyVO;
		try {
			companyVO = companyInfoService.findCompanyInfo();
		} catch (SQLException e) {
			e.printStackTrace();
			new ApplicationException(e);
			return null;
		}
		this.ajaxResponse(companyVO);
		return "test";
	}

	/**
	 * 查找商品类型
	 * 
	 * @author anmin
	 * @return void Created Apr 6, 2013
	 */
	public void findGoodsTypeInfo() {
		init();
		String language = this.getCurrentLanguage();
		try {
			List<Object> pannelVOList = companyInfoService
					.findGoodsTypeInfo(language);
			String jsonStr = this.ListToJsonString(pannelVOList);
			this.ajaxResponse(jsonStr);
			// this.ajaxJsonResponse(pannelVOList);
		} catch (SQLException e) {
			e.printStackTrace();
			this.processErrorMsg(e);
		}
	}

	/**
	 * 查找公司首页信息
	 * 
	 * @author anmin
	 * @return void Created Apr 14, 2013
	 */
	public void findHomeInfo() {
		init();
		String language = this.getCurrentLanguage();
		try {
			CompanyVO companyVO = companyInfoService.findHomeInfo(language);
			String jsonStr = this.objToJsonString(companyVO);
			this.ajaxResponse(jsonStr);
			// this.ajaxJsonResponse(pannelVOList);
		} catch (SQLException e) {
			e.printStackTrace();
			this.processErrorMsg(e);
		}

	}

	/**
	 * 得到当前用户编号
	 * 
	 * @author anmin
	 * @return String Created May 30, 2013
	 */
	public String getCurUserNo() throws SQLException {
		String userName = httpSession.getAttribute("userName") + "";
		String userPassword = httpSession.getAttribute("userPassword") + "";
		String userNo = "";
		Map<String, String> userInfo = new HashMap<String, String>();
		userInfo.put("userName", userName);
		userInfo.put("userPassword", userPassword);
		userNo = companyInfoService.findUserNo(userInfo);
		return userNo;
	}

	/**
	 * 查找商品信息
	 * 
	 * @author anmin
	 * @return void Created Apr 15, 2013
	 */
	public void findGoods() {
		init();
		try {
			findByGoodsTypeTable.put(this.getCurUserNo(), "0");
			List<Object> goodsList = companyInfoService.findGoods(this.pageVO);
			String jsonStr = this.ListToJsonString(goodsList);
			this.ajaxResponse(jsonStr);
		} catch (SQLException e) {
			e.printStackTrace();
			this.processErrorMsg(e);
		}
	}
	
	/**
	 * 查找订单信息
	 * @author anmin
	 * @return void
	 * Created Aug 5, 2013
	 */
	public void findOrderInfoGrdData(){
		init();
		try {
			String userNo = this.getCurUserNo();
			pageVO.setParam1(param1);
			pageVO.setUserNo(userNo);
			List<Object> goodsList = companyInfoService.findOrderInfoGrdData(this.pageVO);
			String jsonStr = this.ListToJsonString(goodsList);
			this.ajaxResponse(jsonStr);
			// this.ajaxJsonResponse(pannelVOList);
		} catch (SQLException e) {
			e.printStackTrace();
			this.processErrorMsg(e);
		}
	}
	
	/**
	 * 查找订单信息记录条数
	 * @author anmin
	 * @return void
	 * Created Aug 5, 2013
	 */
	public void findOrderInfoGrdDataCount(){
		init();
		try {
			String userNo = this.getCurUserNo();
			PageVO pageVO = new PageVO();
			pageVO.setParam1(param1);
			pageVO.setUserNo(userNo);
			Integer goodsListCount = companyInfoService.findOrderInfoGrdDataCount(pageVO);
			goodsListCount = goodsListCount == null ? 0 : goodsListCount;
			this.ajaxResponse(goodsListCount.toString());
			// this.ajaxJsonResponse(pannelVOList);
		} catch (SQLException e) {
			e.printStackTrace();
			this.processErrorMsg(e);
		}
	}
	/**
	 * 查找商品信息
	 * 
	 * @author anmin
	 * @return void Created Apr 15, 2013
	 */
	public void findGoodsCount() {
		init();
		try {
			Integer goodsCount = companyInfoService.findGoodsCount(this.pageVO);
			this.ajaxResponse(goodsCount + "");
			// this.ajaxJsonResponse(pannelVOList);
		} catch (SQLException e) {
			e.printStackTrace();
			this.processErrorMsg(e);
		}

	}

	/**
	 * 根据id查找商品信息
	 * 
	 * @author anmin
	 * @return void Created May 2, 2013
	 */
	public void findSingleGoods() {
		init();
		try {
			GoodsVO goodsVOInfo = companyInfoService.findSingleGoods(goodsVO);
			this.ajaxResponse(goodsVOInfo);
			// this.ajaxJsonResponse(pannelVOList);
		} catch (SQLException e) {
			e.printStackTrace();
			this.processErrorMsg(e);
		}

	}

	/**
	 * 保存用户信息
	 * 
	 * @author anmin
	 * @return Created 2013-5-7
	 */
	public void saveUserInfo() {
		init();
		try {
			userVO.setId(IDGenerator.gerateUUID());
			companyInfoService.saveUserInfo(userVO);
		} catch (SQLException e) {
			e.printStackTrace();
			this.processErrorMsg(e);
		}

	}

	/**
	 * 查找注册时候填写的邮箱信息，如果邮箱不存在，方法返回0，否则返回其他值
	 * 
	 * @author anmin
	 * @return void Created May 12, 2013
	 */
	public void checkUseEmail() {
		init();
		try {
			String userEmaiCount = companyInfoService.checkUserEmail(userVO);
			this.ajaxJsonResponse(userEmaiCount);
		} catch (SQLException e) {
			e.printStackTrace();
			this.processErrorMsg(e);
		}
	}

	/**
	 * 查找注册时候填写的用户名和用户密码是否存在，如果不存在，方法返回0，否则返回其他值
	 * 
	 * @author anmin
	 * @return void Created May 12, 2013
	 */
	public void checkUserInfo() {
		init();
		try {
			String userInfoCount = companyInfoService.checkUserInfo(userVO);
			if ("0".equals(userInfoCount)) {
				this.initUserInfo(userVO.getUserName(), userVO
						.getUserPassword());
			}
			this.ajaxJsonResponse(userInfoCount);
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}

	/**
	 * 用户登陆
	 * 
	 * @author anmin
	 * @return void Created May 20, 2013
	 */
	public void login() {
		init();
		try {
			String userInfoCount = companyInfoService.checkUserInfo(userVO);
			String isExists = "no";
			if (!"0".equals(userInfoCount)) {
				// 用户存在
				this.initUserInfo(userVO.getUserName(), userVO
						.getUserPassword());
				isExists = "yes";
			}
			this.ajaxJsonResponse(isExists);
		} catch (SQLException e) {
			e.printStackTrace();
			this.processErrorMsg(e);
		}
	}

	/**
	 * 将产品添加到购物车库中
	 * 
	 * @author anmin
	 * @return void Created May 27, 2013
	 */
	public void addGoodsToCart() {
		init();
		try {
			String userNo = this.getCurUserNo();
			goodsVO.setUserNo(userNo);
			String goodsNo = goodsVO.getId();
			if (!this.isGoodsExistsInCart(goodsNo, userNo)) {
				// 新添加的商品在购物车库中不存在，则往购物车库中添加新的商品
				goodsVO.setGoodsCartId(IDGenerator.gerateUUID());
				companyInfoService.addGoodsToCart(goodsVO);
			} else {
				// 新添加的商品在购物车库中已经存在，则直接修改购物车库中对应的产品的数量，在原来的基础上加1
				Map<String, String> goodsInfo = new HashMap<String, String>();
				goodsInfo.put("goodsNo", goodsNo);
				goodsInfo.put("userNo", userNo);
				companyInfoService.updateGoodsCountFromCart(goodsInfo);
			}
		} catch (SQLException e) {
			e.printStackTrace();
			this.processErrorMsg(e);
		}
	}
	/**
	 * 查找订单信息
	 * @author anmin
	 * @return void
	 * Created Aug 3, 2013
	 */
	public void findOrderInfo(){
		init();
		String id = orderMenuVO.getId();
		try {
			orderMenuVO = companyInfoService.findOrderInfo(id);
			this.ajaxResponse(orderMenuVO);
		} catch (SQLException e) {
			e.printStackTrace();
			this.processErrorMsg(e);
		}
		
	}
	/**
	 * 保存订单信息
	 * @author anmin
	 * @return void
	 * Created Jul 22, 2013
	 */
	public void saveOrderInfo(){
		init();
		try {
			OrderMenuVO orderInfo = orderMenuVO;
			String id = IDGenerator.gerateUUID();
			orderInfo.setId(id);
			orderInfo.setUserNo(this.getCurUserNo());
			companyInfoService.saveOrderInfo(orderInfo);
			
			updateGoodsCart4OrderMenu(id);
			this.ajaxResponse(id);
		} catch (SQLException e) {
			e.printStackTrace();
			this.processErrorMsg(e);
		}
	}
	/**
	  * 将订单编号修改到购物车表中去
	  * @author anmin
	  * @return void
	  * Created Jul 23, 2013
	  */
	private void updateGoodsCart4OrderMenu(String orderMenuNo)throws SQLException{
		String userNo = this.getCurUserNo();
		List<String> goodsIdList = companyInfoService.findGoodsIdFromCart(userNo);
		if(goodsIdList != null && goodsIdList.size() > 0){
			Map<String,String> goodsCartInfo = new HashMap<String,String>();
			goodsCartInfo.put("userNo", this.getCurUserNo());
			goodsCartInfo.put("orderMenuNo", orderMenuNo);
			for(String goodsNo:goodsIdList){
				goodsCartInfo.put("goodsNo",goodsNo);
				companyInfoService.updateGoodsCart4OrderMenu(goodsCartInfo);
			}
		}
	}

	/**
	 * 逐个从购物车库中减少商品
	 * 
	 * @author anmin
	 * @return void Created Jul 4, 2013
	 */
	public void reduceGoodsFromCartOneByOne() {
		init();
		try {
			String userNo = this.getCurUserNo();
			String goodsNo = goodsVO.getId();
			Map<String, String> goodsInfo = new HashMap<String, String>();
			goodsInfo.put("userNo", userNo);
			goodsInfo.put("goodsNo", goodsNo);
			companyInfoService.reduceGoodsFromCartOneByOne(goodsInfo);
		} catch (SQLException e) {
			e.printStackTrace();
			this.processErrorMsg(e);
		}

	}

	/**
	 * 判断新添加的商品在购物车库中是否已经存在，不存在，方法返回false,否则，方法返回true
	 * 
	 * @author anmin
	 * @return boolean Created May 30, 2013
	 */
	private boolean isGoodsExistsInCart(String goodsNo, String userNo)
			throws SQLException {
		Map<String, String> isExistsCond = new HashMap<String, String>();
		isExistsCond.put("userNo", userNo);
		isExistsCond.put("goodsNo", goodsNo);
		Integer isExistsFlag = companyInfoService
				.isGoodsExistsInCart(isExistsCond);
		if (isExistsFlag == 0) {
			return false;
		}
		return true;
	}
	 /**
	  * 根据类别查询商品信息
	  * @author anmin
	  * Created Sep 8, 2013
	  */
	public void findGoodsByType(){
		init();
		try {
			findByGoodsTypeTable.put(this.getCurUserNo(), param1);
			pageVO.setParam1(param1);
			List<Object> goodsList = companyInfoService.findGoodsByType(pageVO);
			String jsonStr = this.ListToJsonString(goodsList);
			this.ajaxResponse(jsonStr);
		} catch (SQLException e) {
			this.processErrorMsg(e);
			e.printStackTrace();
		}
		
	}
	
	 /**
	  * 根据类别查询商品信息记录条数
	  * @author anmin
	  * Created Sep 8, 2013
	  */
	public void findGoodsByTypeCount(){
		init();
		try {
			String language = this.getCurrentLanguage();
			pageVO = new PageVO();
			pageVO.setParam1(param1);
			pageVO.setLanguage(language);
			int count = companyInfoService.findGoodsByTypeCount(pageVO);
			this.ajaxResponse(count + "");
		} catch (SQLException e) {
			this.processErrorMsg(e);
			e.printStackTrace();
		}
		
	}
	
	
	/**
	 * 根据商品搜索中传入的条件查询商品信息
	 * @author anmin
	 * @return void
	 * Created Sep 21, 2013
	 */
	public void findGoodsByCondition(){
		init();
		try {
			String findByGoodsTypeFlag = findByGoodsTypeTable.get(this.getCurUserNo());
			if(!"0".equals(findByGoodsTypeFlag)){
				pageVO.setParam1(findByGoodsTypeFlag);
			}
			pageVO.setParam2(param2);
			pageVO.setParam3(param3);
			pageVO.setParam4(param4);
			List<Object> goodsList = companyInfoService.findGoodsByCondition(pageVO);
			String jsonStr = this.ListToJsonString(goodsList);
			this.ajaxResponse(jsonStr);
		} catch (SQLException e) {
			this.processErrorMsg(e);
			e.printStackTrace();
		}
		
	}
	
	/**
	 * 根据商品搜索中传入的条件查询商品信息对应的记录条数
	 * @author anmin
	 * @return void
	 * Created Sep 21, 2013
	 */
	public void findGoodsByConditionCount(){
		init();
		try {
			String language = this.getCurrentLanguage();
			pageVO = new PageVO();
			String findByGoodsTypeFlag = findByGoodsTypeTable.get(this.getCurUserNo());
			if(!"0".equals(findByGoodsTypeFlag)){
				pageVO.setParam1(findByGoodsTypeFlag);
			}
			pageVO.setParam2(param2);
			pageVO.setParam3(param3);
			pageVO.setParam4(param4);
			pageVO.setLanguage(language);
			int count = companyInfoService.findGoodsByConditionCount(pageVO);
			this.ajaxResponse(count + "");
		} catch (SQLException e) {
			this.processErrorMsg(e);
			e.printStackTrace();
		}
		
	}
	
	


	/**
	 * 查找够车库中的商品信息
	 * 
	 * @author anmin
	 * @return void Created May 30, 2013
	 * @throws
	 */
	public void findGoodsFromCart() {
		init();
		try {
			String userNo = this.getCurUserNo();
			pageVO.setUserNo(userNo);
			List<Object> goodsList = companyInfoService
					.findGoodsFromCart(pageVO);
			String jsonStr = this.ListToJsonString(goodsList);
			this.ajaxResponse(jsonStr);
		} catch (SQLException e) {
			this.processErrorMsg(e);
			e.printStackTrace();
		}

	}
	/**
	  * 修改购物城中商品数量
	  * @author anmin
	  * @return void
	  * Created Jun 14, 2013
	  */
	public void saveGoodsCountToCart() {
		init();
		try {
			String userNo = this.getCurUserNo();
			goodsVO.setUserNo(userNo);
			companyInfoService.saveGoodsCountToCart(goodsVO);
		} catch (SQLException e) {
			this.processErrorMsg(e);
			e.printStackTrace();
		}
	}
	/**
	  * 查找单个的证件信息
	  * @author anmin
	  * @return CertificationVO
	  * Created Oct 2, 2013
	  */
	public void findSingleCertification(){
		init();
		try {
			CertificationVO certificationVO = companyInfoService.findSingleCertification(param1);
			List<Object> list = new ArrayList<Object>(1);
			list.add(certificationVO);
			String jsonStr = this.ListToJsonString(list);
			this.ajaxResponse(jsonStr);
		} catch (SQLException e) {
			this.processErrorMsg(e);
			e.printStackTrace();
		}
	}

	/**
	 * 查找够车库中的商品信息
	 * 
	 * @author anmin
	 * @return void Created May 30, 2013
	 * @throws
	 */
	public void findGoodsFromCartCount() {
		init();
		try {
			String userNo = this.getCurUserNo();
			pageVO = pageVO == null ? new PageVO() : pageVO;
			pageVO.setUserNo(userNo);
			Integer count = companyInfoService.findGoodsFromCartCount(pageVO);
			this.ajaxResponse(count + "");
		} catch (SQLException e) {
			this.processErrorMsg(e);
			e.printStackTrace();
		}

	}

	/**
	 * 查找商品库存
	 * 
	 * @author anmin
	 * @return void Created Jun 14, 2013
	 */
	public void findRemainGoods() {
		init();
		try {
			String userNo = this.getCurUserNo();
			goodsVO.setUserNo(userNo);
			String goodsRemainCount = companyInfoService
					.findRemainGoods(goodsVO);
			this.ajaxResponse(goodsRemainCount + "");
		} catch (SQLException e) {
			this.processErrorMsg(e);
			e.printStackTrace();
		}

	}

	/**
	 * 从购物车库中删除指定的商品
	 * 
	 * @author anmin
	 * @return void Created Jul 4, 2013
	 */
	public void deleteGoodsFromCart() {
		init();
		try {
			String userNo = this.getCurUserNo();
			String goodsNo = goodsVO.getId();
			Map<String, String> goodsInfo = new HashMap<String, String>();
			goodsInfo.put("userNo", userNo);
			goodsInfo.put("goodsNo", goodsNo);
			companyInfoService.deleteGoodsFromCart(goodsInfo);
		} catch (SQLException e) {
			this.processErrorMsg(e);
			e.printStackTrace();
		}
	}

	/**
	 * 计算购物车中物品总价
	 * 
	 * @author anmin
	 * @return String Created Jul 2, 2013
	 */
	public void caculateTotalPrice() {
		init();
		try {
			String userNo = this.getCurUserNo();
			String totalPrice = companyInfoService.caculateTotalPrice(userNo);
			this.ajaxResponse(totalPrice);
		} catch (SQLException e) {
			this.processErrorMsg(e);
			e.printStackTrace();
		}
	};
	/**
	 * 
	 * @author anmin
	 * @return void
	 * Created Aug 17, 2013
	 */
	public void findGoodsNos(){
		init();
		try {
			String findByGoodsTypeFlag = findByGoodsTypeTable.get(this.getCurUserNo());
			if(!"0".equals(findByGoodsTypeFlag)){
				goodsVO = goodsVO == null ? new GoodsVO() : goodsVO;
				goodsVO.setGoodsTypeId(findByGoodsTypeFlag);
			}
			
			List<Object> goodsNos = companyInfoService.findGoodsNos(goodsVO);
			String jsonStr = this.ListToJsonString(goodsNos);
			this.ajaxResponse(jsonStr);
		} catch (SQLException e) {
			this.processErrorMsg(e);
			e.printStackTrace();
		}
	}
    /**
     * 分页查找证件信息
     * @author anmin
     * @return void
     * Created Sep 30, 2013
     */	
	public void findCertificationInfo(){
		init();
		try {
			List<Object> goodsNos = companyInfoService.findCertificationInfo(pageVO);
			String jsonStr = this.ListToJsonString(goodsNos);
			this.ajaxResponse(jsonStr);
		} catch (SQLException e) {
			this.processErrorMsg(e);
			e.printStackTrace();
		}
	}
	
	/**
     * 分页查找证件信息
     * @author anmin
     * @return void
     * Created Sep 30, 2013
     */	
	public void findCertificationInfoCount(){
		init();
		try {
			int certificationCount = companyInfoService.findCertificationInfoCount(pageVO);
			this.ajaxResponse(certificationCount + "");
		} catch (SQLException e) {
			this.processErrorMsg(e);
			e.printStackTrace();
		}
		
	}
	
	/**
	  * 查找在线交流工具信息
	  * @author anmin
	  * @return String
	  * Created Sep 28, 2013
	  */
	public void findOnlineTool(){
		init();
		try {
			String onlineToolInfo = companyInfoService.findOnlineTool();
			this.ajaxResponse(onlineToolInfo);
		} catch (SQLException e) {
			
			this.processErrorMsg(e);
			e.printStackTrace();
		}
	}
	/**
	 * 查询相册信息
	 * @author anmin
	 * @return void
	 * Created Oct 5, 2013
	 */
	public void findAlbum(){
		init();
		try {
			List<Object> album = companyInfoService.findAlbum(pageVO);
			String jsonStr = this.ListToJsonString(album);
			this.ajaxResponse(jsonStr);
		} catch (SQLException e) {
			this.processErrorMsg(e);
			e.printStackTrace();
		}
	}
	
	/**
	 * 查询相册信息
	 * @author anmin
	 * @return void
	 * Created Oct 5, 2013
	 */
	public void findAlbumCount(){
		init();
		try {
			int count = companyInfoService.findAlbumCount();
			this.ajaxResponse(count + "");
		} catch (SQLException e) {
			this.processErrorMsg(e);
			e.printStackTrace();
		}
	}
	/**
	 * 查找相册中的相片
	 * @author anmin
	 * @return void
	 * Created Oct 6, 2013
	 */
	public void findPicList(){
		init();
		try {
			pageVO.setParam1(param1);
			List<Object> picList = companyInfoService.findPicList(pageVO);
			String jsonStr = this.ListToJsonString(picList);
			this.ajaxResponse(jsonStr);
		} catch (SQLException e) {
			this.processErrorMsg(e);
			e.printStackTrace();
		}
	}
	/**
	 * 查找相册中的相片对应的记录条数
	 * @author anmin
	 * @return void
	 * Created Oct 6, 2013
	 */
	public void findPicListCount(){
		init();
		try {
			pageVO = pageVO == null ? new PageVO() : pageVO;
			pageVO.setParam1(param1);
			int count = companyInfoService.findPicListCount(pageVO);
			this.ajaxResponse(count + "");
		} catch (SQLException e) {
			this.processErrorMsg(e);
			e.printStackTrace();
		}
	}
	/**
	 * 查找单个的相片
	 * @author anmin
	 * @return void
	 * Created Oct 7, 2013
	 */
	public void findSinglePic(){
		init();
		try {
			PicVO picVO = companyInfoService.findSinglePic(param1);
			List<Object> picList = new ArrayList<Object>(1);
			picList.add(picVO);
			String jsonStr = this.ListToJsonString(picList);
			this.ajaxResponse(jsonStr);
		} catch (SQLException e) {
			this.processErrorMsg(e);
			e.printStackTrace();
		}
	}
    /**
     * 查找相册下面的所有相片编号
     * @author anmin
     * @return void
     * Created Oct 7, 2013
     */	
	public void findPicNos(){
		init();
		try {
			List<Object> picList = companyInfoService.findPicNos(param1);
			String jsonStr = this.ListToJsonString(picList);
			this.ajaxResponse(jsonStr);
		} catch (SQLException e) {
			this.processErrorMsg(e);
			e.printStackTrace();
		}
	}
	/**
	 * 查找公告信息
	 * @author anmin
	 * @return void
	 * Created Oct 7, 2013
	 */
	public void findAnnonceContent(){
		init();
		try {
			List<Object> annonceContentList = companyInfoService.findAnnonceContent();
			String jsonStr = this.ListToJsonString(annonceContentList);
			this.ajaxResponse(jsonStr);
		} catch (SQLException e) {
			this.processErrorMsg(e);
			e.printStackTrace();
		}
		
	}
	/**
	 * 退出登陆
	 * 
	 * @author anmin
	 * @return void Created May 28, 2013
	 */
	public void exit() {
		init();
		this.clearUserInfo();
		this.ajaxJsonResponse("yes");
	}
   
	
   /********************* anner ********************/
	/**
	 * 查找公司顶部图片
	 * 
	 * @author anner
	 * @return void
	 */
	public String findTopPic(){
		init();
		List<TopPicVO>topPicVOList = null;
		try {
			topPicVOList = companyInfoService.findTopPic(topPicVO);
			this.ajaxResponseJsonString(topPicVOList);
		} catch (SQLException e) {
			e.printStackTrace();
			this.processErrorMsg(e);
		}
		return null;

	}


	public CompanyInfoService getCompanyInfoService() {
		return companyInfoService;
	}

	public void setCompanyInfoService(CompanyInfoService companyInfoService) {
		this.companyInfoService = companyInfoService;
	}
	
}
